home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Auto Destruct Objects
- Sent: 6/27/96 9:20 AM
- Received: 6/27/96 9:26 AM
- From: Henri Lamiraux, lamiraux@apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- >Hi:
- >
- >I have just started using ODF and have started working on a part editor. The
- >question I have is about auto destruct objects. The documentation is a little
- >vague on how they work. My question is, is there any scope with respect to
- >which auto destruct objects are deleted for a given exception or are all auto
- >destruct objects deleted for any exception? This may be a problem since many
- >of ODF's objects are auto destruct. Also, what happends when an auto destruct
- >object such as FW_CString255 is a member of another class and the string
- >object is allocated as part of the class (i.e. FW_CString255 fText)?
- >
- >Thanks in advance
- >
- >Scott Champ
- >
- >Sciex
- >71 Four Valley Drive
- >Concord, Ontario, Canada
- >L4K-4V8
-
- Auto-destruct object in ODF behaves exactly the same way as standard C++
- objects with a compiler supporting exception. With compilers like
- Metrowerks or visual C++ which supports exception you can turn off the
- ODF emulation exception and use the compiler native exception. In this
- case ODF is better following the same rules otherwise you would not have
- the same behavior with emulation and native exception. Look at any C++
- manual covering exceptions and you can apply that to ODF.
-
- ........................................................................
- Henri Lamiraux lamiraux@apple.com
- Apple Computer, Inc. OpenDoc(tm) Development Framework
- ........................................................................
-
-